README file for 'Replication Data for "Did Earth eat its leftovers? Impact 
ejecta as a component of the late veneer"'
Philip J. Carter, 2022, https://doi.org/10.7910/DVN/4NOILF, Harvard Dataverse.


This dataset contains data used to produce the figures found in the article:
"Did Earth eat its leftovers? Impact ejecta as a component of the late veneer", 
P. J. Carter and S. T. Stewart, 2022, PSJ.

It also contains initial condition and final output files for all of the 
simulations, and code for reading this file format.

--------------------------------------------------------------------------------

Contents of this dataset:

pkdgrav_ss.py - Python code for reading PKDGRAV (ss) files
README - This readme file

One directory for each simulation containing input and (selected) output files,
and processed output. Full output is provided for the two high-resolution 
simulations used as examples throughout the paper: 022GTJf6hgas and 022f6sgas_4,
only a subset of output times are provided for the remaining simulations.

--------------------------------------------------------------------------------

PKDGRAV ss files:

The ss files (both initial conditions [ssic.ss] and outputs [ss.??????????]) 
contain properties for each particle at a particular time. These files can be 
read using the included python code. Contains particle mass (solar masses), 
particle radius (au), particle cartesian coordinates (au), particle cartesian 
velocity components (au/year/(2*pi)), particle ID number, and particle 
color/type.

The file header stores the time, the number of particles, and a file type flag.
                
--------------------------------------------------------------------------------

PKDGRAV origin_bins files:

The origin_bins files give the mass weighted provenance data for each particle 
in the corresponding ss output file. The format is as follows:

Number of particles (N)
N lines giving fraction of mass of each particle that originated in each of 10 
or 25 0.1 au wide bins
                
--------------------------------------------------------------------------------

PKDGRAV core_origin files:

The core_origin files have the same format as origin_bins files and give the 
provenance data for each particles core weighted by core mass.
                
--------------------------------------------------------------------------------

PKDGRAV cfrac files:

The cfrac files give the core mass fraction for each particle 
in the corresponding ss output file. The format is as follows:

Number of particles (N)
N lines giving core mass fraction of each particle
                
--------------------------------------------------------------------------------

PKDGRAV iord files:

The iord files give the particle ID number for each particle in the 
corresponding ss output file. The format is as follows:

Number of particles (N)
N lines giving ID for each particle
                
--------------------------------------------------------------------------------

PKDGRAV ss.par files:

The par files give the parameters used for the simulations.
                
--------------------------------------------------------------------------------

collarray.txt files:

The collarray files provide an index for collisions recorded in the simulation.
The format is as follows:

One row for each collision specifying:
index of previous collision of particle 1, 
index of previous collision of particle 2, 
particle ID of projectile, 
particle ID of target, 
particle ID for remnant 1, 
particle ID for remnant 2

If a particle did not have a previous collision or a remnant does not exist it is
given the number -1000 instead.
                
--------------------------------------------------------------------------------

collisions_makeearth.txt files:

These files contain data for each collision, one file for each simulation.
The format is as follows:

One row for each collision specifying: 
time of impact (year/(2*pi)), 
ID of collider 1,
ID of collider 2,
mass of collider 1 (solar masses), 
mass of collider 2 (solar masses), 
collision outcome number,
number of remnant bodies,
mass of largest remnant (solar masses),
mass of 2nd largest remnant (solar masses),
core mass of collider 1 (solar masses), 
core mass of collider 2 (solar masses), 
core mass of largest remnant (solar masses),
core mass of 2nd largest remnant (solar masses),
target radius (au),
projectile radius (au),
impact parameter


collision outcomes are denoted by number, where:
1.0: perfect merge
2.0: partial accretion
3.2: hit-and-run - projectile intact
3.2: hit-and-run - projectile disrupted
3.2: hit-and-run - projectile supercatastrophically disrupted
4.0: erosion
5.0: supercatastrophic disruption

--------------------------------------------------------------------------------

collisions_vQ.txt files:

The collisions_vQ files contain further data for each collision, one file for 
each simulation.
The format is as follows:

One row for each collision specifying: 

impact velocity (km/s), 
escape velocity (km/s),
principal disruption energy (erg/g),
principal disruption velocity (km/s),
supercatastrophic disruption velocity (km/s),
erosion velocity (km/s),
compute thread ID number,
unused column [-1],
unused column [-1],
largest remnant semi-major axis (au),
largest remnant eccentricity,
largest remnant inclination,
second largest remnant semi-major axis (au),
second largest remnant eccentricity,
second largest remnant inclination,
unresolved debris mass produced (solar masses)
        
        
Disruption energy and velocity thresholds are only given if impact velocity 
exceeds escape velocity, otherwise they are 0. If a remnant does not exist the 
values will be zero.

--------------------------------------------------------------------------------

comp_evolution files:

The comp_evolution_?.dat files contain the mass, semi-major axis, and provenance 
correlation for the numbered embryo (numbered in descending mass order) and the 
20 bodies with final provenance most similar to the embryo.
The format is as follows:

One row for each output time:

time (year/(2*pi)),
embryo mass (solar masses),
embryo semi-major axis (au),
embryo final provenance correlation coefficient,
{ similar body mass (solar masses),
  similar body semi-major axis (au),
  similar body provenance correlation } *20


If a particular body does not exist at a particular output time the mass will be 
recorded as 1e-25 and the semi-major axis and correlation as -99. 
        
--------------------------------------------------------------------------------

pkdgrav_ss.py:

Python code for reading PKDGRAV ss files.
Implements the ss class for a PKDGRAV ss file and associated origin bin data. 
Contains a brief example of how to use the code.
                
